package com.lin.missyou.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * 标记为抽象、
 * 好处：
 *      面向对象
 * @author gcq
 * @Create 2021-10-12
 */
@Getter
@Setter
@MappedSuperclass
public abstract class BaseEntity {

    /**
     * insert 或 update 该字段不生效
     */
    @JsonIgnore
    @Column(insertable = false, updatable = false)
    private Date createTime;
    @JsonIgnore
    @Column(insertable = false, updatable = false)
    private Date updateTime;
    @JsonIgnore
    private Date deleteTime;
}